package net.sf.jimex.jira;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

/**
 * andrew 19.03.2006 13:07:43
 */
public class LinkType {
    private String name;
    private Long id;
    private static final String LABEL_NONE = "None";
    private static final String LABEL_SUB_TASK = "SubTask";
    private static final String LABEL_LAST_CHILD_AS_SUB_TASK = "Last child as SubTask";
    public static final Long TYPE_NONE = new Long(1);
    public static final Long TYPE_SUBTASK = new Long(2);
    public static final Long TYPE_SUBTASK_LAST = new Long(3);

    public LinkType(String name, Long id) {
        this.name = name;
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public static Collection getLinkTypes() {
        List linkTypes = new ArrayList();
        linkTypes.add(new LinkType(LABEL_LAST_CHILD_AS_SUB_TASK, TYPE_SUBTASK_LAST));
        linkTypes.add(new LinkType(LABEL_NONE, TYPE_NONE));
        linkTypes.add(new LinkType(LABEL_SUB_TASK, TYPE_SUBTASK));
        return linkTypes;
    }
}
